{include file="public_head" /}

<!-- Select2 -->
<link href="__STATIC__/css/select/select2.min.css" rel="stylesheet">

<body class="nav-md">

<div class="container body">

    <div class="main_container">

        {include file="public_sidebar,public_nav" /}
        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">

                <div class="page-title">
                </div>
                <div class="clearfix"></div>
                <div class="row">
                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>码卷验证
                                    <!--<small>different form elements</small>-->
                                </h2>
                                <ul class="nav navbar-right panel_toolbox">
                                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                                    </li>
                                    <li><a class="close-link"><i class="fa fa-close"></i></a>
                                    </li>
                                </ul>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <br/>
                                <form class="form-horizontal form-label-left" enctype="multipart/form-data" action=""
                                      method="post" id="registerForm">
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">所属分类：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            <div>{$item.cat_name}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">订 单 号：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            <div>{$item.shop_order_number}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">用户账号：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            <div>{$item.username}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">下单/退款 时间：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            <div>{$item.create_time}{in name="$item.status" value="10,11,12"} / {$item.refund_create_time}{/in}</div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">服务门店：</label>
                                        <div class="col-md-2 col-sm-6 col-xs-12">
                                            {eq name="$item.status" value="1"}
                                            <select name="shop_id" class="form-control" style="width: 300px;float: left;" tabindex="-1" >
                                                <option value="0">请选择门店</option>
                                                {foreach :model('shop')->where('auding_status',2)->order('shop_status','asc')->select() as $key=>$vo }
                                                <option value="{$vo.id}" {eq name='$item.shop_id|default=""' value='$vo.id' }selected{/eq}>{switch name="$vo.shop_status"}
                                                {case 1}空闲{/case}
                                                {case 2}{$vo.wait_time_index}-{$vo.wait_time_h}时{$vo.wait_time_m}分{/case}
                                                {/switch}-{$vo.shop_title}</option>
                                                {/foreach}
                                            </select>
                                            {else/}
                                            {:model('shop')->where('id',$item.shop_id)->value('shop_title')}
                                            {/eq}
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">订单总额：</label>
                                        <div class="col-md-1 col-sm-6 col-xs-12" >
                                            <input type="text" placeholder="请填写订单总额" {neq name="$item.status" value="1"}readonly{/neq}
                                                   class="form-control col-md-7 col-xs-12" name="amount"
                                                   value="{$item.amount|default=''}" datatype="*" nullmsg="请填写订单总额"
                                            >
                                        </div>
                                    </div>

                                    {in name="$item.service_type_id" value="1,2"}
                                    {eq name="$item.service_type_id" value="1"}
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">投保险种：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            <div>{:implode(' ',$item.service_info.type_id_name)}</div>
                                        </div>
                                    </div>
                                    {/eq}
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">投保人：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            <div>{$item.service_info.protecteder}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">手机号码：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            <div>{$item.service_info.phone}&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">实名认证：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            <img src="/{$item.service_info.protecter_face}" width="180" height="110" onerror="this.src='/default_img.png'"> <img src="/{$item.service_info.protecter_back}" width="180" height="110" onerror="this.src='/default_img.png'">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">被保车辆：</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            <img src="/{$item.service_info.car_face}" width="180" height="110" onerror="this.src='/default_img.png'"> <img src="/{$item.service_info.car_back}" width="180" height="110" onerror="this.src='/default_img.png'">
                                        </div>
                                    </div>
                                    {/in}

                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">订单状态：</label>
                                        <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            {switch name="item.status"}
                                            {case 1}未支付{/case}
                                            {case 6}已派单--{switch name="$item.code"}{case 1}等待验证{/case}{case 2} 已验证{/case}{/switch}{/case}
                                            {case 5}已付款{/case}
                                            {case 4}已评价{/case}
                                            {case 10}退款中{/case}
                                            {case 11}退款成功{/case}
                                            {case 12}退款失败{/case}
                                            {/switch}
                                            <br/>

                                        </div>

                                    </div>
                                    {in name="item.status" value="10"}
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">退款状态：</label>
                                        <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                            <select name="status" class="form-control" style="width: 200px;float: left;" tabindex="-1" {in name='item.status' value='11,12'}disabled{/in}>
                                            <option value="11" {eq name='item.status' value='11'}selected{/eq}>申请退款成功</option>
                                            <option value="12" {eq name='item.status' value='12'}selected{/eq}>申请退款失败</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">未退款理由：</label>
                                        <div class="col-md-1 col-sm-6 col-xs-12" style="margin-top: 10px;">
                                                <textarea type="text" placeholder="未退款理由,不填写留空" style="width: 500px;height: 100px;"
                                                          class="form-control col-md-7 col-xs-12" name="fail_explain">{$refund_find.message|default=''}</textarea>
                                            <div style="width:500px;clear: both">
                                                <span style="font-size: 16px;color: red">注：只有在退款状态是退款失败的时候填写</span>
                                            </div>
                                        </div>
                                    </div>
                                    {/in}

                                    <div class="ln_solid"></div>
                                    <div class="form-group">
                                        <div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
                                            {in name="$item.status" value="1"}
                                            <button type="submit" class="btn btn-primary">确认派单</button>
                                            {/in}
                                            {in name="$item.status" value="10"}
                                            <button type="submit" class="btn btn-primary">退款提交</button>
                                            {/in}
                                            <a type="reset" class="btn btn-success" onclick="history.go(-1)">返回</a>
                                        </div>
                                    </div>

                                </form>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
            <!-- /page content -->

        </div>

    </div>
</div>

{include file="public_foot" /}
<!-- validform -->
<script src="__STATIC__/js/Validform_v5.3.2_min.js"></script>
<script src="__STATIC__/js/layer.js"></script>
<!--select-->
<script src="__STATIC__/js/select/select2.full.min.js"></script>
<script>

    // validform
    $(function () {

        $.Tipmsg.r = null;

        var showmsg = function (msg) {
            //假定你的店铺商品提示方法为showmsg， 在方法里可以接收参数msg，当然也可以接收到o及cssctl;
            alert(msg);
        }

        // select2
        $(".select2_single").select2({
            placeholder: "请选择快递公司",
            allowClear: true
        });

        $(".select2_single2").select2({
            placeholder: "请选择订单状态",
            allowClear: true
        });

        $("#registerForm").Validform({
            tiptype: function (msg) {
                layer.msg(msg);
            },
            tipSweep: true
        });
    })
</script>
</body>

</html>
